# import nltk
# nltk.download('maxent_ne_chunker_tab')
# nltk.download('words')
import nltk
from nltk.tokenize import word_tokenize

# input_str = "the little yellow dog died"
input_str = "Edison went to Tsinghua University today."
# input_str = ' Today\' s weather is good, very windy and sunny, \
# we have no classes in the afternoon, We have to play basketball tomorrow \
#   good good'
# input_str = "爱迪生今天去清华大学"

tokens = word_tokenize(input_str)
pos_tagged = nltk.pos_tag(tokens)
ne_chunked = nltk.ne_chunk(pos_tagged)
print(ne_chunked)